-
-
Notifications
You must be signed in to change notification settings - Fork 537
fix: honor pgbackrest_archive_command for archive_command in patroni.yaml
#1320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
it is assumed that the user will specify the desired archive_command in the postgresql_parameters variable, example: postgresql_parameters:
- { option: "archive_command", value: "{{ pgbackrest_archive_command }}" }
- ...But if he didn't do it explicitly, then we substitute him at the pre-checks level - https://github.com/vitabaks/autobase/blob/2.4.1/automation/roles/pre_checks/tasks/pgbackrest.yml |
| --- | ||
| # Patroni configure | ||
|
|
||
| # Ensure archive_command is set correctly for pgbackrest (same logic as pre_checks/pgbackrest.yml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand why we should duplicate the logic here, because we are already set archive_command in pre_checks role.
Ah! Though I am not sure if this is best approach:
I personally try to avoid setting From a user PoV, I'd highly prefer |
|
I'm thinking of adding a |
|
That might be an option yes. From a user PoV, I'd be happy not having to set The best would be to have a default for backups in place and even when deciding for another tool, only having to use |
This is currently broken (and according to my backup history since ~ 2 months).
With the following config
the
bootstrap.dcs.postgresql.parameters.archive_commandoption inpatroni.ymlwas still set to the defaultcd .. This caused allpgbackrestcron runs to fail.Maybe there is a better way to fix this, but the following patch works.